Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

EOExpression
(informal protocol)

Category Of:	NSObject
Object

Declared In:	eoaccess/EOExpressionArray.h

Category Description

The EOExpression category declares a single method, expressionValueForContext:, which is used to format modeling objects for inclusion in SQL statements created by an EOSQLExpression object. This method returns an NSString that represents the object's name or value in a form that a SQL interpreter can process. The object you send this message to is typically referred to as an expression object; the return value of the message is the expression object's expression value.

expressionValueForContext: is used internally by the Framework; however, you may find it useful in debugging your application. For example, if you're having problems with a qualifier you can print its expression value to get a readable representation.

The following classes implement expressionValueForContext: meaningfully: NSObject and Object (invoke stringValue or return nil if the object doesn't respond to that message), EOEntity, EOAttribute, EOAttributeOrdering, EORelationship, EONull, EOQualifier, EOExpressionArray, EOFormatExpresion, EOQuotedExpression, EOSQLExpression. Note that NSCalendarDate and NSData don't implement this method, since an adaptor usually has to handle dates and binary data in a server-specific manner.

Instance Methods

expressionValueForContext:

- (NSString *)expressionValueForContext:(id <EOExpressionContext>)context 

Returns a string representation of the receiver, suitable for use in a SQL statement. If context is non-nil the receiver can use it to format an attribute reference or a data path ending in an attribute reference (see the EOExpressionContext protocol specification for information on formatting attribute references).